//通过函数返回最新的Variable变量表 更新样式
import {Dimensions } from 'react-native';
const generateMarquee = (Variables)=>{
    return {
        //一行文字标题栏高度 
        marqueeHeight: Variables.sizeHeightXl,
        //一行文字标题文本字号
        marqueeFontSize:Variables.fontSizeBase,
        //一行文本标题颜色
        marqueeTextColor:Variables.colorGray1,
        //一行文本右侧图标尺寸
        marqueeRightIconSize:Variables.sizeIconM,
        //一行文本左侧图标尺寸
        marqueeLeftIconSize:Variables.sizeIconM,
        //一行文本左侧边距
        marqueePaddingLeft:Variables.spacingM,
        //二行文本标题栏高度
        marqueeTwoHeight:Variables.sizeHeightXxxl,
        //二行文本标题文字字号
        marqueeTwoFontSize:Variables.fontSizeXxs,
        //二行文本标题颜色
        marqueeTwoTextColor:Variables.colorGray1,
          //二行文本左侧图标尺寸
        marqueeTwoLeftIconSize:Variables.sizeIconXl,
    }
}

const getMarqueeStyle =(Variables)=>{
    let  marqueeStyle = generateMarquee(Variables)
    let styles = {
        container: {
            flexDirection: 'row',
            alignItems: 'center',
            justifyContent: 'flex-start',
            width: Dimensions.get('window').width
        },
        bgView: {
            flexDirection: 'row',
            overflow: 'hidden',
            height: marqueeStyle.marqueeHeight,
        },
        leftIconCon: {
            width: 60,
            alignItems: 'center',
            paddingLeft: marqueeStyle.marqueePaddingLeft,
            paddingRight: 16
        },
        leftIconStyle: {
            width: marqueeStyle.marqueeLeftIconSize,
            height: marqueeStyle.marqueeLeftIconSize,
            resizeMode: 'contain'
        },
        rightIconCon: {
            width: 55,
            alignItems: 'flex-end',
            paddingLeft: 19,
            paddingRight: 8
        },
        rightIconStyle: {
            width:marqueeStyle.marqueeRightIconSize,
            height: marqueeStyle.marqueeRightIconSize,
            resizeMode: 'contain'
        }
    }
    return {
        marqueeStyle,styles
    }
}

export { getMarqueeStyle }